home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / feynman / gluonsetup.tex < prev    next >
Text File  |  1992-07-02  |  10KB  |  288 lines

  1. %                            GLUONSETUP(31).TEX
  2. % CALLED BY FEYNMAN(34).
  3. % USED FOR GENERATING GLUON LINES IN FEYNMAN DIAGRAMS IN LATEX.
  4. \global\newcount\gluonlength
  5. \global\newcount\gluonlengthx
  6. \global\newcount\gluonlengthy
  7. \global\newcount\gluonfrontx  %}(x,y) co-ord of left of gluon
  8. \global\newcount\gluonfronty  %}
  9. \global\newcount\gluonbackx
  10. \global\newcount\gluonbacky
  11. %
  12. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  13. \gdef\setunitbox(#1)[#2][#3](#4)[#5]{
  14. \gdef\upperunitbox{\oval(#1,#1)[#2]}
  15. \gdef\lowerunitbox{\oval(401,401)[#3]}
  16. \gdef\thirdunitbox{\oval(#4,#4)[#5]}
  17. }
  18. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  19. \gdef\selectgluon{  % ORIGINALLY DEFINED IN FEYNMAN(29+).  RECURSIVELY RE-DEFINE
  20. \global\advance\gluoncount by 1  % Counts number of gluons drawn. 
  21. \global\gluonfrontx=\particlefrontx   % READ IN FROM FEYNMAN \selectgluon
  22. \global\gluonfronty=\particlefronty   % READ IN FROM FEYNMAN \selectgluon
  23. \global\particleadjustx=0     \global\particleadjusty=0
  24. % Error messages for overly-long lines.  See FEYNMAN for negative-lengths.
  25. \ifnum\unitboxnumber > 40
  26. \message{   *** WARNING *** Gluon with 
  27. \the\unitboxnumber\space loops requested ***   }
  28. \ifnum\unitboxnumber > 85
  29. \message{   *** Reducing gluon length to 6 loops (max 85) ***   }
  30. \ifnum\unitboxnumber > 1000
  31. \message{   *** Probable Cause:  Gluon selected instead of Fermion ***   }
  32. \fi \global\unitboxnumber=6 \fi \fi  % end of length error
  33. \global\unitboxnumberpo=\unitboxnumber  % DEFINED IN \drawsavedline (FEYNMAN).
  34. \global\advance\unitboxnumberpo by 1 %\unitboxnumber if \unitboxnumber is odd.
  35. % DEFAULTS:
  36. \global\numlineparts = 3
  37. \global\numupperunits=\unitboxnumber
  38. \global\numlowerunits=\unitboxnumber
  39. \global\numthirdunits=\unitboxnumber
  40. % select gluon alignment:
  41. \ifcase\LINEDIRECTION
  42. \Ngluon    %\LINEDIRECTION=0 (NORTH) CASE
  43. \or  \NEgluon  % 1 case
  44. \or  \Egluon   % 2 case...horizontal gluon.
  45. \or  \SEgluon
  46. \or  \Sgluon
  47. \or  \SWgluon 
  48. \or  \Wgluon
  49. \or  \NWgluon
  50. \else\DIRECTERROR \fi
  51. \setparticle  
  52. \global\gluonlengthx=\particlelengthx  \global\gluonlengthy=\particlelengthy
  53. \global\gluonbackx=\particlebackx      \global\gluonbacky=\particlebacky      
  54. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  55. \gdef\Ngluon{   % VERTICAL gluons
  56. \ifcase\LINECONFIGURATION   % \REG GLUON CONFIGURATION
  57. \setcoords(600,540,600)(20,620,1220)[0,1050] 
  58. \setunitbox(1600)[tl][r](1600)[bl]
  59. \particleadjusty=195
  60. \or % \FLIPPED
  61. \setcoords(-990,-930,-990)(12,615,1215)[0,1050]
  62. \setunitbox(1600)[tr][l](1600)[br]
  63. \particleadjusty=195
  64. \or % \CURLYGLUON
  65. \setcoords(440,390,440)(-10,415,840)[0,850]  
  66. \setunitbox(1250)[tl][r](1250)[bl]
  67. \particleadjustx=0
  68. \particleadjusty=-10
  69. \or % \FLIPPED case
  70. \setcoords(-820,-770,-820)(-25,400,825)[0,850]  % Matches change in \S\CURLY
  71. \particleadjusty=-10  % goes with \CURLY \particleadjusty=-10
  72. \setunitbox(1250)[tr][l](1250)[br]
  73. \or \UNIMPERROR  % \LCONFIG=4 is \FLAT case
  74. \or \UNIMPERROR  % \LCONFIG=5 is \FLIPPEDFLAT case
  75. \or % \LCONFIG=6 is \CENTRALGLUON case
  76. \numupperunits=\unitboxnumberpo
  77. \numlowerunits=\unitboxnumber
  78. \numthirdunits=\unitboxnumberpo
  79. \setcoords(-200,-200,-200)(616,1041,616)[0,850]
  80. \setunitbox(1250)[tl][r](1250)[bl]
  81. \particleadjusty=1238
  82. \particleadjusty=1233
  83. \or % \FLIPPEDCENTRAL
  84. \numupperunits=\unitboxnumberpo
  85. \numlowerunits=\unitboxnumber
  86. \numthirdunits=\unitboxnumberpo
  87. \setcoords(-200,-200,-200)(620,1045,620)[0,850]
  88. \setunitbox(1250)[tr][l](1250)[br]
  89. \particleadjusty=1245
  90. \else \UNIMPERROR % etc.
  91. \fi
  92. }
  93. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  94. \gdef\NEgluon{
  95. \numupperunits=\unitboxnumberpo
  96. \numlowerunits=\unitboxnumber
  97. \numthirdunits=\unitboxnumber
  98. \ifcase\LINECONFIGURATION
  99. \setcoords(900,900,900)(0,900,900)[900,900]
  100. \setunitbox(2200)[tl][tr](401)[b]
  101. \particleadjustx=1100     \particleadjusty=1100
  102. \or % \FLIPPED case
  103. \setcoords(-180,720,720)(1090,1091,1091)[900,900]
  104. \setunitbox(2200)[br][tr](401)[l]
  105. \particleadjustx=1110     \particleadjusty=1050                      
  106. \else \UNIMPERROR % etc.
  107. \fi
  108. }
  109. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  110. \gdef\Egluon{     % EASTWARD HORIZONTAL gluons
  111. \ifcase\LINECONFIGURATION
  112. \setcoords(-210,390,990)(-800,-745,-800)[1050,0]  % draws from outer line edge
  113. \setunitbox(1600)[tr][b](1600)[tl]  
  114. \particleadjustx=130  % draws from outer line edge
  115. \or % \FLIPPED
  116. \setcoords(-210,390,990)(800,745,800)[1050,0]  % draws from outer line edge
  117. \setunitbox(1600)[br][t](1600)[bl]
  118. \particleadjustx=130
  119. \or % \CURLYGLUON
  120. \setcoords(-200,225,650)(-625,-575,-625)[850,0]
  121. \setunitbox(1250)[tr][b](1250)[tl]  
  122. \or % \FLIPPED case
  123. \setcoords(-200,225,650)(625,575,625)[850,0]
  124. \setunitbox(1250)[br][t](1250)[bl]
  125. \or % \LCONFIG=4 is \FLAT case
  126. \setcoords(-200,430,1060)(-830,-780,-830)[1260,0]
  127. \setunitbox(1660)[tr][b](1660)[tl]
  128. \or % \LCONFIG=5 is \FLIPPEDFLAT case
  129. \setcoords(-200,430,1060)(830,780,830)[1260,0]
  130. \setunitbox(1660)[br][t](1660)[bl]
  131. \or % \LCONFIG=6 is \CENTRALGLUON case
  132. \numupperunits=\unitboxnumberpo
  133. \numlowerunits=\unitboxnumber
  134. \numthirdunits=\unitboxnumberpo
  135. \setcoords(440,865,440)(0,50,0)[850,0]
  136. \setunitbox(1250)[tr][b](1250)[tl]
  137. \particleadjustx=1260
  138. \or % \FLIPPEDCENTRALGLUON case 
  139. \numupperunits=\unitboxnumberpo
  140. \numlowerunits=\unitboxnumber
  141. \numthirdunits=\unitboxnumberpo
  142. \setcoords(430,855,430)(0,-50,0)[850,0]
  143. \setunitbox(1250)[br][t](1250)[bl]
  144. \particleadjustx=1250
  145. \or % \LCONFIG=8 is \SQUASHEDGLUON case
  146. \setcoords(-160,440,1040)(-600,-550,-600)[1200,0]
  147. \gdef\upperunitbox{\oval(1600,1200)[tr]}
  148. \gdef\thirdunitbox{\oval(1600,1200)[tl]}
  149. \gdef\lowerunitbox{\oval(401,401)[b]}
  150. \else \UNIMPERROR 
  151. \fi
  152. }
  153. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  154. \gdef\SEgluon{  
  155. \numupperunits=\unitboxnumberpo
  156. \numlowerunits=\unitboxnumber
  157. \numthirdunits=\unitboxnumber
  158. \ifcase\LINECONFIGURATION
  159. \setcoords(-200,700,700)(-1100,-1100,-1100)[900,-900]
  160. \setunitbox(2200)[tr][br](401)[l]
  161. \particleadjustx=1100     \particleadjusty=-1100  
  162. \or % \FLIPPED case
  163. \setcoords(890,890,890)(0,-900,-900)[900,-900]
  164. \setunitbox(2200)[bl][br](401)[t]
  165. \particleadjustx=1050     \particleadjusty=-1100 
  166. \else \UNIMPERROR % etc.
  167. \fi
  168. }
  169. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  170. \gdef\Sgluon{   % VERTICAL gluons
  171. \ifcase\LINECONFIGURATION  % \REG STYLE GLUON
  172. \setcoords(-1000,-940,-1000)(0,-595,-1195)[0,-1050]
  173. \setunitbox(1600)[br][l](1600)[tr]
  174. \particleadjusty=-150
  175. \or % \FLIPPED
  176. \setcoords(605,545,605)(-20,-615,-1215)[0,-1050]
  177. \setunitbox(1600)[bl][r](1600)[tl]  
  178. \particleadjusty=-150
  179. \or % \CURLYGLUON
  180. \setcoords(-820,-770,-820)(0,-425,-850)[0,-850]
  181. \setunitbox(1250)[br][l](1250)[tr]  
  182. \or % \FLIPPED case
  183. \setcoords(440,390,440)(0,-425,-850)[0,-850]
  184. \setunitbox(1250)[bl][r](1250)[tl]  
  185. \or \UNIMPERROR % \LCONFIG=4 is \FLATGLUON case
  186. \or \UNIMPERROR
  187. \or % \LCONFIG=6 is \CENTRALGLUON case
  188. \numupperunits=\unitboxnumberpo
  189. \numlowerunits=\unitboxnumber
  190. \numthirdunits=\unitboxnumberpo
  191. \setcoords(-180,-180,-180)(-635,-1060,-635)[0,-850]
  192. \setunitbox(1250)[br][l](1250)[tr]  
  193. \particleadjusty=-1290
  194. \or % \FLIPPEDCENTRAL case
  195. \numupperunits=\unitboxnumberpo
  196. \numlowerunits=\unitboxnumber
  197. \numthirdunits=\unitboxnumberpo
  198. \setcoords(-180,-180,-180)(-635,-1060,-635)[0,-850]
  199. \setunitbox(1250)[bl][r](1250)[tl]
  200. \particleadjusty=-1290
  201. \else \UNIMPERROR % etc.
  202. \fi
  203. }
  204. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  205. \gdef\SWgluon{
  206. \numupperunits=\unitboxnumberpo
  207. \numlowerunits=\unitboxnumber
  208. \numthirdunits=\unitboxnumber
  209. \ifcase\LINECONFIGURATION
  210. \setcoords(-1300,-1300,-1300)(0,-900,-900)[-900,-900]
  211. \setunitbox(2200)[br][bl](401)[t]
  212. \particleadjustx=-1100     \particleadjusty=-1100
  213. \or % \FLIPPED case
  214. \setcoords(-215,-1115,-1115)(-1107,-1107,-1107)[-900,-900]
  215. \setunitbox(2200)[tl][bl](401)[r]
  216. \particleadjustx=-1120     \particleadjusty=-1120
  217. \else \UNIMPERROR % FLIPPED FLATGLUON etc.
  218. \fi
  219. }
  220. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  221. \gdef\Wgluon{   % HORIZONTAL gluons
  222. \ifcase\LINECONFIGURATION
  223. \setcoords(-190,-790,-1390)(800,745,800)[-1050,0]
  224. \setunitbox(1600)[bl][t](1600)[br]  
  225. \particleadjustx=-150  %302
  226. \or % \UNIMPERROR % \FLIPPED
  227. \setcoords(-190,-790,-1390)(-800,-745,-800)[-1050,0]
  228. \setunitbox(1600)[tl][b](1600)[tr]  
  229. \particleadjustx=-150  %302
  230. \or % \CURLYGLUON
  231. \setcoords(-200,-625,-1050)(625,575,625)[-850,0]
  232. \setunitbox(1250)[bl][t](1250)[br]  
  233. \or % \FLIPPED case
  234. \setcoords(-200,-625,-1050)(-625,-575,-625)[-850,0] 
  235. \setunitbox(1250)[tl][b](1250)[tr]  
  236. \or % \LCONFIG=4 is \FLATGLUON case
  237. \setcoords(-230,-860,-1490)(830,780,830)[-1260,0]
  238. \setunitbox(1660)[bl][t](1660)[br]  
  239. \or % \UNIMPERROR
  240. \setcoords(-230,-860,-1490)(-830,-780,-830)[-1260,0]
  241. \setunitbox(1660)[tl][b](1660)[tr]
  242. \or % \LCONFIG=6 is \CENTRALGLUON case
  243. \numupperunits=\unitboxnumberpo
  244. \numlowerunits=\unitboxnumber
  245. \numthirdunits=\unitboxnumberpo
  246. \setcoords(-825,-1250,-825)(0,-50,0)[-850,0]
  247. \setunitbox(1250)[bl][t](1250)[br]  
  248. \particleadjustx=-1250
  249. \or  % \FLIPPEDCENTRALGLUON
  250. \numupperunits=\unitboxnumberpo
  251. \numlowerunits=\unitboxnumber
  252. \numthirdunits=\unitboxnumberpo
  253. \setcoords(-825,-1250,-825)(0,50,0)[-850,0] 
  254. \setunitbox(1250)[tl][b](1250)[tr]  
  255. \particleadjustx=-1250
  256. \else \UNIMPERROR % FLIPPED FLATGLUON etc.
  257. \fi
  258. }
  259. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  260. \gdef\NWgluon{
  261. \numupperunits=\unitboxnumberpo
  262. \numlowerunits=\unitboxnumber
  263. \numthirdunits=\unitboxnumber
  264. \ifcase\LINECONFIGURATION
  265. \setcoords(-200,-1100,-1100)(1100,1100,1100)[-900,900]
  266. \setunitbox(2200)[bl][tl](401)[r]
  267. \particleadjustx=-1110   \particleadjusty=1100
  268. \or  % \FLIPPED
  269. \setcoords(-1309,-1309,-1309)(-15,885,885)[-900,900]
  270. \setunitbox(2200)[tr][tl](401)[b]
  271. \particleadjustx=-1120   \particleadjusty=1065
  272. \else \UNIMPERROR % FLIPPED FLATGLUON etc.
  273. \fi
  274. }
  275. %
  276. %                         *** GLUON LINKS AND CAPS ***
  277. %
  278. \gdef\gluonlink{    %  A `RECURSIVE' DEFINITION.
  279. \input gluonlinks   % \gluonlink is redefined here.
  280. \gluonlink}  %  THIS RE-DEFINES \gluonlink FOR ALL FUTURE USES.
  281. %
  282. \gdef\gluoncap{    %  A `RECURSIVE' DEFINITION.
  283. \input gluonlinks   % \gluoncap is redefined here.
  284. \gluoncap}  %  THIS RE-DEFINES \gluoncap FOR ALL FUTURE USES.
  285.